package com.linwen.javase.基础;

import org.junit.Test;

/**
 * @ClassName _Valiable
 * @Description TODO
 * @Author zero
 * @DATE 2024/8/29 9:54 PM
 * @Version 1.0
 */
public class _Valiable {

    @Test
    public void test(){
        long start = System.currentTimeMillis();
        Integer sum = 0;
        for (int i = 0; i < 100_000_000; i++) {
            sum++;
        }
        System.out.println("auto box cost "+(System.currentTimeMillis() - start));
    }

    @Test
    public void test1(){
        long start = System.currentTimeMillis();
        int sum = 0;
        for (int i = 0; i < 100_000_000; i++) {
            sum++;
        }
        System.out.println("un box cost  "+(System.currentTimeMillis() - start));
    }
}
